#pragma once

#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include<string>


class LvWindow
{
public:
	LvWindow(int w, int h, std::string name);
	~LvWindow();

	LvWindow(const LvWindow&) = delete;
	LvWindow& operator=(const LvWindow&) = delete;

	bool shouldClose();

	void createWindowSurface(VkInstance instance, VkSurfaceKHR* surface);
	
	VkExtent2D getExtent() 
	{ 
		return { static_cast<uint32_t>(width), static_cast<uint32_t>(height) }; 
	}
	
	bool wasWindowResizedFlag()
	{
		return framebufferResized;
	}
	
	void resetWindowResizedFlag()
	{
		framebufferResized = false;
	}

private:
	static void framebufferResizeCallback(GLFWwindow* window, int width, int height);
	void initWindow();
	
	int width;
	int height;
	bool framebufferResized = false;

	std::string windowName;
	GLFWwindow* window;

};

